package com.he.DesignPatterns.StaticFactory;

/**
 * @description: TODO
 * @Author: HCL
 * @Date: 2024/8/26 9:29
 */
public class CoffeeStore {

    private CoffeeFactory coffeeFactory;

    public void setFactory(CoffeeFactory coffeeFactory){
        this.coffeeFactory = coffeeFactory;
    }
    public Coffee selectCoffee() {
        Coffee coffee = coffeeFactory.createCoffee();
        coffee.addMilk();
        coffee.addSugar();
        return coffee;
    }
}
